package com.raymond.queue.codec.decoding;

import com.raymond.queue.common.codec.annotation.MsgCodec;
import com.raymond.queue.common.codec.decoding.BaseDecoder;
import com.raymond.queue.common.enums.CommandIdType;
import com.raymond.queue.common.msg.BaseAgreement;
import com.raymond.queue.common.msg.request.HeartbeatRequest;
import io.netty.channel.ChannelHandlerContext;

import java.util.List;

/**
 * 心跳请求解码
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2021-07-14 14:24
 */
@MsgCodec(commandId = CommandIdType.HEARTBEAT_REQ)
public class HeartbeatRequestDecoder extends BaseDecoder {
    @Override
    public void decode(ChannelHandlerContext ctx, BaseAgreement msg, List<Object> out) throws Exception {
        out.add(new HeartbeatRequest());
    }
}
